package com.changxianggu.cloud.crawler.core.modules.university.service.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.changxianggu.cloud.crawler.core.modules.university.entity.UniversityEbookDemand;
import com.changxianggu.cloud.crawler.core.modules.university.mapper.UniversityEbookDemandMapper;
import com.changxianggu.cloud.crawler.core.modules.university.service.IUniversityEbookDemandService;
import com.changxianggu.cloud.crawler.core.config.mybatisplus.service.impl.BaseServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 电子教材登记表 服务实现类
 * </p>
 *
 * @author liuyuantao
 * @since 2020-03-09
 */
@Service
@DS("university")
public class UniversityEbookDemandServiceImpl extends BaseServiceImpl<UniversityEbookDemandMapper, UniversityEbookDemand> implements IUniversityEbookDemandService {


    @Override
    public void updateHandlerStatus(String mobile, Integer status, String message) {
        this.update().eq(UniversityEbookDemand::getMobile, mobile)
                .set(UniversityEbookDemand::getHandlerStatus, status)
                .set(UniversityEbookDemand::getHandlerMessage, message).execute();
    }
}
